package com.infore.operation.mapper;

import com.infore.operation.entity.*;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

/**
 * @author:wk
 * @date:Created in 15:01 2018\4\17 0017
 */
public interface FaultRecordMapper {

    Integer saveFaultRecord(Map<String,Object> map);

    void updateFaultRecord(@Param("equipId")String equipId,@Param("findId")String findId,@Param("time")String time,@Param("typeId")String typeId,
                         @Param("title")String title,@Param("discrib")String discrib,@Param("state")Integer state,@Param("headPson")String headPson,@Param("id")String id);

    void deleteFaultImage(@Param("faultId")String faultId);

    void saveFaultImage(@Param("images")List<Image> images);

    List<FaultList> queryFaultList(@Param("userId")String userId);

    FaultDetail queryFaultDetail(@Param("id")String id);

    List<Image> queryFaultImage(@Param("id")String id);

    List<Approve> queryApproveList(@Param("id")String id);

    List<Fix> queryFixList(@Param("id")String id);

    List<Fix> queryNotFix(@Param("id")String id);

    List<Confirm> queryAllApproveList(@Param("id")String id);

    List<FaultList> searchFaultList(@Param("userId")String userId,@Param("keyword")String keyword,@Param("faultTypeId")String faultTypeId,@Param("starttime")String starttime,@Param("endtime")String endtime);

    List<MtPcsDetail> queryMtPcsDetail(@Param("id")String id);

    List<FaultType> queryFaultType();

    void updateRout(@Param("id")String id);

    void deleteRstPic(@Param("id")String id);

    void deleteRst(@Param("id")String id);

    void deleteFaultImg(@Param("id")String id);

    void deleteFaultApproval(@Param("id")String id);

    void deleteFault(@Param("id")String id);

    FaultRecord queryFaultRecordDetailByEquip(@Param("id")String id);

    FaultRecord queryFaultRecordDetail(@Param("id")String id);

    void updateLessFaultRecord(@Param("state")String state,@Param("hqId")String hqId,@Param("id")String id);

    void updateFaultApproval(@Param("step")String step,@Param("fixId")String fixId,@Param("personId")String personId,@Param("remark")String remark,@Param("id")String id);

    Long saveFaultApproval(Map<String,Object> map);

    List<FixList> queryReconditionList(@Param("userId")String userId);

    Long saveMtPcs(Map<String,Object> map);

    void saveMtPcsDetail(@Param("partdetail")List<PartDetail> details);

    Long saveRst(Map<String,Object> map);

    void saveRstImage(@Param("images")List<RstImage> images);

    void saveInspectImage(@Param("images")List<RstImage> images);

    List<RstList>  queryCheckList(@Param("userId")String userId);

    void updateOhRst(@Param("appId")String appId,@Param("state")String state,@Param("id")String id);

    Inspect queryInspectByStationId(@Param("stationId")String stationId);

    List<Inspect> queryInspect(@Param("id")String id,@Param("stationId")String stationId,@Param("startTime")String startTime,@Param("endTime")String endTime);

    List<MtPcsDetail> queryRoutMtPcsDetail(@Param("id")String id);

    void deleteInspectPic(@Param("id")String id);

    void deleteInspect(@Param("id")String id);

    List<Stock> searchStock(@Param("keyword")String keyword,@Param("id")String id,@Param("brId")String brId);

    List<NStock> queryNStock(@Param("brId")String brId,@Param("id")String id);

    List<NStock> searchNStock(@Param("brId")String brId,@Param("keyword")String keyword);

    Long saveInspect(Map<String,Object> map);

    Long saveFaultRecordByMap(Map<String,Object> map);

    FixDetail getFixDetail(@Param("id")Integer id);

    List<Stock> getStockByFix(@Param("id")Integer id);

    List<FaultRecdList> queryFaultRecdList(@Param("userId")Integer userId,@Param("stepcode")String stepcode,@Param("postId")Integer postId);
}
